package com.xieyingwangluo.yxpart.mapper;

import com.xieyingwangluo.yxpart.entity.EnrollModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface EnrollMapper {

    //添加
    int add(EnrollModel enrollModel);

    //根据用户id和兼职id查找报名表
    @Select("select * from enroll where userinfo_id=#{userinfo_id} and part_id=#{part_id}")
    List<EnrollModel> selUserAndPart(@Param("userinfo_id") String userinfo_id, @Param("part_id") String part_id);

    //查询报名信息
    @Select("select * from enroll where userinfo_id=#{userinfo_id}")
    List<EnrollModel> selO(@Param("userinfo_id") String userinfo_id);

    //获取用户列表
    //模糊查询报名信息
    List<EnrollModel> selA(EnrollModel enrollModel);

    //取消报名
    int del(String noid);
}
